<<<<<<< HEAD

export function hasClass(el,classname){
	var exp = new RegExp('(^|\\s)'+classname+'(\\s|$)');
	return exp.test(el.className);
}

 export function addClass(el,classname){
 	if (hasClass(el,classname)) {
 		return 0;
 	};
 	var newClass = el.className.split(' ');
 	newClass.push(classname);
 	el.className = newClass.join(" ");
 }
=======
export function hasClass(el,classname){
	let reg = new RegExp('(^|\\s)' + classname + '(\\s|$)')
	return reg.test(el.className)
}

export function addClass(el,classname){	
	if(hasClass(el,classname)){
		return 
	}
	let newClass = el.className.split(' ')
	newClass.push(classname)
	el.className = newClass.join(' ')
}
>>>>>>> 2f2681559102dd200f119afb607054cf37b8104a
